<!-- "Mod/GeneralGameServerMod/View/UserInfo.html" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
<pe:mcml>
<script refresh="false" type="text/npl" src="Api.lua">
<![CDATA[

-- 用户名
function username()
    local iconList = {
        vip = "textures/worldshare_32bits.png#256 311 18 18",
        teacher = "textures/worldshare_32bits.png#285 311 18 18";
    }
    local username = "xiaoyao";
    local userType = "vip";
    local textWidth = _guihelper.GetTextWidth(username)

    if userType == 'teacher' then
        local left = (140 - 23 - 2 - textWidth) / 2

        return '<img tooltip="<%= L\'动画编程导师\' %>" style="margin-top: 4px;margin-left:' .. left .. 'px;margin-right: 2px;width: 16px;height: 16px;background:url(' .. iconList['teacher'] .. ')" />' .. username
    elseif userType == 'vip' then
        local left = (140 - 16 - 2 - textWidth) / 2

        return '<img tooltip="<%= L\'VIP用户\' %>" style="margin-top: 4px;margin-left:' .. left .. 'px;margin-right: 2px;width: 16px;height: 16px;background:url(' .. iconList['vip'] .. ')" />' .. username
    else
        return '<div style="text-align: center">' .. username .. '</div>'
    end
end
    echo(Mod.WorldShare.Store:Get('user/userType'));
]]>
</script>
<style type="text/mcss">
</style>
<div style="width: 300px; height: 300px;">
    <div style="font-size: 16px;font-weight:bold;color:#ffffff;shadow-quality:8;shadow-color:#80133f48;text-shadow:true;">xiaoyao</div>
</div>
</pe:mcml>
</body>
</html>
<!-- 
    background-color: #ff0000;  不支持文本颜色 red
    height: 100% 不支持
    float: right 不支持
    margin: 不支持分开简写(10px 20px)
    26 22 38 28

NPL.load("Mod/GeneralGameServerMod/App/View/Api.lua");
local Api = commonlib.gettable("Mod.GeneralGameServerMod.App.View.Api");
Api:Show();
 -->